package com.foreknow.demo1;

import java.util.Scanner;

/**
 * Scanner的使用
 */
public class ScannerDemo {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入用户名: ");
        String name = input.next();
        System.out.println("请输入年龄: ");
        int age = input.nextInt();
        System.out.println("请输入所在学校: ");
        String school = input.next();
        System.out.println("请输入成绩: ");
        double score = input.nextDouble();
        System.out.println("用户名: " + name + "年龄: " + "所在学校: " + school + "成绩: " + school);

    }
}
